Opto-mechanical postion finder

ABSTRACT

An apparatus and method for finding part position relations of parts of mechanical and opto-mechanical machining and quality control systems, and for recognizing these parts, is disclosed. The present invention relies on optical contactless sensing technology, with recording of optical fiducial patterns and therefrom determining positions close to the work positions without physical contact. Part positions of machines are determined by associating or mechanically integrating fiducial patterns ( 1 ) with key parts, and optically detecting the images of these patterns. Part positions and displacements according to given part position finder ( 6 ) strategies are found, by associating fiducial pattern images ( 14 ) and machine position data ( 17 ) to parts that are members of a part geometry relation ( 15 ), and under part displacement constraints ( 16 ), finding given part positions or displacements ( 18 ). Using fiducial patterns ( 1 ), identification and recognition of work pieces, work holders, work tools, gauge tools, and machine parts in general is enabled.

FIELD OF INVENTION

The present invention relates to the field of technical arrangements andmethods for determining positions, and more specifically to an apparatusand a method for determining a positional deviation that has occurred inthe course of a mechanical machining operation or a mechanical controlactivity.

BACKGROUND

In order to simplify this disclosure by uniquely identifying importantparts related to a typical machine system, which may be a system formechanical quality control, we shall in the following explain the use ofsome general terms. The term “machine” denotes any production or qualitycontrol machine, such as machining centers for milling, drilling,turning, etc., an EDM (Electrical Discharge Machine), a CMM (CoordinateMeasuring Machine), a touch probe and stylus position sensing machine, acomputer vision system, even a simple mechanical support structure, orsimilar. “Work piece” denotes a part to be machined or to be subjectedto quality control. The actual area on the work piece that has beenmachined, or quality controlled, is denoted “work area”. The part ordevice that is performing the actual machining or quality control of thework area is denoted “work tool”. The work tool can be a machining tool(for milling, turning, drilling, etc.), a spark erosion tool (EDM tool),a touch probe or stylus position sensor, an optical imaging sensor, anelectromagnetic sensor, or similar. Typically, the work piece isfastened to the machine by use of a “work holder”. We shall denote thefollowing 3 distinct parts of the work holder by “work holder support”,“work clamp”, and “work locator(s)”. In some cases, the work holder, orsome of its parts, may be identified as an integral part of the machine.

In relation to the definition of present day mechanical referencesystems, the work locators play a crucial role. These work locators aredefined mechanical positions against which the work piece is placed, andthereby the work piece position is defined relative to the machine andwork tool. All the mechanical parts of a machine including the differentsupport structures, work pieces, work tools, and work holders we shallcall a machine part.

The position of the work piece, or the different parts of a machine,etc., shall, unless otherwise stated, in this document typically meanthe position, orientation, or both of the aforementioned, relative toanother part. We shall call the meeting position between the work tooland work piece “the work position”.

There are no viable techniques available for reading the work positiondirectly at the time when the machining or quality control actually istaking place. In many cases the positional precision of machinesrelative to the work locators are taken care of by automatically readingthe exact position from e.g. glass rulers, by indicating the position ofthe corresponding translation stages, by relying on motor positioncontrollers and encoders, or simply by use of fixed mountings. In orderto position the work piece, the work holders either simply clamp itagainst some more or less prepared locator surfaces, or clamp it againstwell-prepared mechanical locator pins. Then, the work piece position isfound by use of a position sensor. In some cases work holders themselvesalso contain position sensors. However, ultimately what is required isto accurately know the work tool position(s) in relation to the workarea position(s). Those positions are not readily available for directreading since the positions readers are located offset from the workarea and work tool positions. This means that quite often residualangular and translation offsets, between the reading and workingpositions, are not properly taken care of. In addition actual work piececlamping, work tool replacement, moving a work piece from one machine tothe other, and mechanical transmission errors, may result inunaccountable offsets between work tool and work area positions. Finallyunaccountable displacement errors also occur during machining, or aquality control sensor reading, as can be the case when thermal andmechanical forces are working, or the work tool is changed, changingposition, wearing down, or replaced. In general, these errors aretackled by relying on good craftsmanship in making, or using, workholders with properly arranged work locators and holding forces. Forreference, see “Fundamentals of tool design”; John G. NEE, ISBN:0-87263-490-6, 1998, 769 pp (Publisher: Society of ManufacturingEngineers, Dearborn, Mich. 48121). However, regular updating of amachine with correct position values during the work process is anelaborate task that is seldom undertaken, and when an update isperformed important reference data may not be sufficiently accurate, orthey may be lacking all together. A good example is when a chuck mountedmilling cutter is replaced with a chuck mounted stylus sensor in orderto change the process from machining to position quality control, andback again. This may introduce an unknown position offset between themachining and position control tool that does not make it possible tocorrectly deal with offset position errors.

To improve accuracy, or counteract the fact that unaccountabledisplacements may occur, several techniques are in common use such as:mechanical touch probe and stylus sensing, macroscope and microscopeviewing, laser beam obstruction sensing, and pressure transducersensing, see “Modern Machine Shop's Handbook for the MetalworkingIndustries”; Editor Woodrow Chapman, ISBN: 1-56990-345-X; 2002, 2368pages, (Publisher: Hanser Gardner) and “Modern Machine Shops Guide toMachining Operations”; Woodrow Chapman; ISBN: 1-56990-357-3, 2004, 968pages (Publisher: Hanser Gardner). The touch probe determines theposition of the work piece by use of a position sensing stylus tip. Thistouch probe can be mounted on the work tool carrier, in the work toolchuck, or possibly on the work piece carrier. In order to work properlyit must either be calibrated each time it is used, permanently fastened,or reproducibly mounted in a mechanical fixture or chuck. Duringmachining the touch probe must be removed, otherwise it may collide withthe work holder or work piece. In order to accurately find 2D or 3Dpositions, or angular displacements, several somewhat time consumingreadings in different directions have to be carried out. Alternatively,through a combination of microscope viewing and position control of themicroscope, key relative work piece and work area positions can also befound, or calibrated. But, since human viewing is involved, thistechnique lacks the potential of becoming fully automated, and also hasdifficulty in finding work holder locator positions. Yet othertechniques help determine the position of the work tool tip by readingthe degree of obstruction of a laser beam, or reading the work tool tippressure by use of a pressure transducer. During wear this position canbe updated. But these techniques do not tell where the work piece isplaced.

Like microscope viewing, techniques related to manual, semi-automated,or automated camera viewing should be useful in finding relative orcalibrated positions on the work piece and work area. U.S. Pat. No.6,782,596 B2 discloses yet another approach where a plurality of datumare disposed and calibrated relative to a work piece before the workpiece is disposed in a machine. However, according to the knowledge ofthe present inventors, common to all presently known techniques is thatthey lack the ability to do regular position sensing while machining orquality control is taking place, and/or that they depend on calibrationand position sensing external to the machine itself. They also lack aholistic approach that properly copes with the position errors of otherparts than those actually machined or controlled. During the workprocesses they are relatively time consuming in their operation, and mayin some cases themselves introduce unaccountable positional errors.

SUMMARY

The present invention provides an apparatus for finding part positionrelations of parts of mechanical and opto-mechanical machining andquality control systems, and for recognizing these parts, comprising thefeatures recited in the accompanying independent patent claim 1.

Further advantageous features of the apparatus for finding part positionrelations of parts of mechanical and opto-mechanical machining andquality control systems are recited in the accompanying dependent patentclaims 2 through 39.

The present invention provides a method for finding part positionrelations of parts of mechanical and opto-mechanical machining andquality control systems, and for recognizing these parts, comprising thefeatures recited in the accompanying independent patent claim 79.

Further advantageous features of the apparatus and the method forfinding part position relations of parts of mechanical andopto-mechanical machining and quality control systems are recited in theaccompanying dependent patent claims 41 through 78.

The present invention provides a computer program product comprising acomputer readable medium having thereon computer readable and computerexecutable code arranged to adapt a computer means to perform themethod, the features of which computer program product are recited inthe accompanying patent claim 79.

The present invention relies on optical contactless sensing technologyand holds the promise of becoming an in-the-process quality controltechnique that regularly and automatically can provide updates ofposition information for key machine parts without having to rely onexternal quality control and calibration means. The recording of opticalfiducial patterns makes it possible to read positions close to the workpositions without physical contact, and part position finder strategiescomplete the job by enabling calculation of positions of other relatedparts, including the actual work positions themselves.

The present invention determines part positions of machines byassociating or mechanically integrating fiducial patterns with keyparts, and optically detecting the images of these patterns. FIGS. 2 and4 schematically exemplifies machines covered by the present inventionwhere 1A-F exemplifies fiducial patterns integrated with parts withinthese machines. These fiducial patterns 1 can be geometrical partdetails, patterned tags fastened to the parts, or part surfacemicrostructure. The present invention finds part positions anddisplacements according to given part position finder 6 strategies, eventhe positions of those parts that do not contain fiducial patterns. Asillustrated by FIG. 1 this is accomplished by associating fiducialpattern images 14 and machine position data 17 to parts that are membersof a part geometry relation 15, and under part displacement constraints16, finding given part positions or displacements 18. FIG. 3 exemplifiesa part geometry relation 15 as a hierarchy of coordinate frames where1A-F represents fiducial pattern local positions and 2A-D representlocator local positions. The present invention also identifies andrecognizes fiducial patterns, and thereby identifies and recognizes workpieces, work holders, work tools, gauge tools, and machine parts ingeneral.

BRIEF DESCRIPTION OF THE DRAWINGS

In the drawings, which are not necessarily drawn to scale, like numeralsdescribe substantially similar components throughout the several views.Like numerals having different letter suffixes represent differentinstances of substantially similar components. The drawings illustrategenerally the present invention, by way of example, and by variousembodiments discussed in the present disclosure.

FIG. 1 shows a functional diagram that illustrates key ideas of thepresent invention. In this figure the arrowhead lines indicate datatransfer. The fully drawn and dotted lines indicate mechanicalinterlinks. The dotted lines indicate alternative mechanical interlinks.Images of fiducial patterns 1 are detected by means of the opticaldetector 3 and converted to fiducial pattern images 14. On the basis ofknowledge about part geometry relations 15 the part position finder 6associates fiducial pattern images 14 and corresponding machine positiondata 17 to given parts. By use of part displacement constraints 16, thatdefines what part(s) position displacements that are allowed, the partposition finder 6 finds what part(s) displacements 18 or positions thatresults in the recorded fiducial pattern image 14 displacements orpositions,

FIG. 2 is a schematic drawing illustrating generally one example of amachine, representing any machine such as a milling machine, drillingmachine, Die sinking EDM (Electrical Discharge Machine), Wire EDM, orsimilar, the drawing illustrating also generally one example of amachine, representing any quality control machine where the work tool 9may be for example either a touch probe as in a CMM (CoordinateMeasuring Machine), or an optical vision sensor, or similar,

FIG. 3 is a schematic diagram where selected parts of the machineillustrated in FIG. 2 are represented by coordinate reference frames,and where the lines represent mechanical (solid) and optical (dotted)interlinks. In this figure the rectangular boxes represent coordinatereference frames. The solid lines between the boxes represent mechanicalinterlinks and the dotted lines optical interlinks/paths. The smallcircles represent either fiducial patterns 1A-F or mechanical locators2A-C. The inclusion of an optical detector 3 and fiducial patterns 1helps create what we shall call closed loops of reference frames makingit possible to find the position of parts that are related to certainloops, and

FIG. 4 is a schematic drawing illustrating generally one example of amachine, representing any machine such as a milling machine, drillingmachine, Die sinking EDM (Electrical Discharge Machine), or similar, andhow this example via the fiducial pattern 1A refers a local work tool 9tip position to optical detector 3 positions by means of a gauge tool19, and

FIG. 5 is a schematic diagram where selected parts of the machineillustrated in FIG. 4 are represented by coordinate reference frames,and where the lines represent mechanical (solid) and optical (dotted)interlinks. In this figure the rectangular boxes represent coordinatereference frames. The solid lines between the boxes represent mechanicalinterlinks and the dotted lines optical interlinks/paths. The smallcircle represent a larger fiducial pattern 1A area on the gauge tool 19.The inclusion of an optical detector 3 and fiducial patterns 1A helpcreate what we shall call closed loops of reference frames making itpossible to find the position of parts that are related to certainloops.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

In the following detailed description, reference is made to theaccompanying drawings which form a part hereof, and which is shown byway of illustration specification embodiments in which the invention maybe practiced. These embodiments are described in sufficient detail toenable those skilled in the art to practice the invention, and it is tobe understood that the embodiments may be combined, or that to otherembodiments structural, logical and electrical changes may be made whilestill representing the present invention. The following detaileddescription is, therefore, not to be taken in a limiting sense, as thegeneral scope of the present invention is defined by the appended claimsand their equivalents.

In the following examples, a reference coordinate frame position, orsimply a frame, represents the position, included orientation, of acomponent, or a part of a larger structure, relative to anothercomponent, or part of a larger structure. The specification of a frameposition may both represent nominal and measured positions. We shallalso describe what we call frame relations. These relations representthe frame positions and the fact that components or parts aremechanically or optically interlinked, or that parts of a largerstructure are mechanically interlinked. In one of its simplest forms,the frame relations may only describe four frames that for examplerepresent a machine support structure, a moving part inside a machine, apart fastened to the moving part, and an optical detector fastened tothe moving part, respectively. Then the position of the part fastened tothe moving part may be determined from data provided by the opticaldetector. In other cases, the reference frame relations may represent amore complicated mechanical structure.

In the following, the present invention will be described by way ofseveral examples.

Example 1

FIG. 2 is a schematic drawing illustrating, by way of example, a machinethat may represent any machine such as a milling machine, drillingmachine, Die sinking EDM (Electrical Discharge Machine), Wire EDM, orsimilar. This schematic drawing also illustrates generally, by way ofexample, one example of a machine that represents any quality controlmachine where the work tool 9 may be for example either a touch probe asin a CMM (Coordinate Measuring Machine), or an optical vision sensor, orsimilar. These machines can be equipped with a range of differentmechanical configurations, but all can be equipped with an apparatusaccording to the present invention. Some key elements of these machinesare indicated as a work piece carrier 100 (typically performing 2orthogonal translations x and y), a work tool carrier 101 (typicallyperforming one translation in the z direction, but sometimes also one orseveral additional rotations), a work tool chuck 102, position encoders103A, 103B, and a support structure. The support structure is in thisexample indicated to include a work piece support 104, a machine supportlink 105, and a work tool support 106. The purpose of this machine is toperform machining or quality control of the work piece 8 by means of thework tool 9. In this example the work tool 9 is fastened to the worktool chuck 102. The work tool 9 can be a machining tool, spark erosiontool, mechanical sensor, position stylus sensor, optical imaging sensor,microscope, or similar. An area of the work piece 8, to be machined orquality controlled, we shall call the work area 10. Moving the work tool9 relative to the work piece 8, by means of the work tool carrier 101and the work piece carrier 100, performs displacements necessary for themachining or quality control processes to take place. During process theposition of these carriers is read at the locations of the positionencoders 103A, 103B. In order to position the work piece 8, and therebythe work area 10, relative to the work tool 9, the work piece 8 isplaced in a work holder 11. Typically, the work holder 11 is firmlyfastened to the work piece carrier 100. A work holder 11 may typicallyconsist of a work holder support 12, a work holder clamp 13, and worklocators 2A, 2B, 2C. By placing the work piece 8 against the worklocators 2A, 2B, 2C, and by clamping it by use of the work holder clamp13, the work piece 8 is securely fastened to the work holder 11.

In this example, a problem to be dealt with can be stated as follows. Inrelation to what has been described above, however, one key problem isthat the position encoders 103A and 103B are mounted at a distance awayfrom the locations of the work area 10 and the work tool 9 tip, and forexample, due to unknown angular errors, may not be reading the correctpositions of the work tool 9 or the work piece area 10. As aconsequence, the clamping process and both thermal and mechanical forcesmay cause the location of the work piece 8, relative to the location ofthe work tool 9 position, to slightly change or vary during operationsof the machining or quality control. In the present example we shallassume that the work piece 8 might translate horizontally in the x- andy-direction relative to the work holder support 12.

Accordingly, details regarding the first machine part 20; the secondmachine part 21; the fiducial pattern 1; the optical detector 3; thefiducial pattern image 14 and machine position 17 should be provided.The reduction of the position errors is accomplished by recordingoptical images of fiducial patterns, as exemplified in FIG. 2 where anoptical detector 3 records the fiducial pattern image 14 of the fiducialpattern 1A and relays it to the a part position finder 6. The opticaldetector is a 2 dimensional array camera. The optical detector 3 is bymeans of the optical assembly 4 and the bracket 107 fastened to the worktool carrier 101. The part position finder 6 can be embodied as processwithin a computer, personal computer, dedicated processor, or similar.The fiducial pattern images 14 are by known means converted/digitizedand will be available for computer position calculation. In FIG. 2 thefiducial pattern 1A is, as an example, the given surface structure ofthe work piece 8, or alternatively a patterned label applied to thesurface. Through the optical path 5A the fiducial pattern 1A isoptically imaged to the optical detector 3. The same fiducial pattern 1Ais also via the work piece 8 and the locators 2A, 2B, 2C mechanicallyinterlinked to other parts of the machine. In order to improve machineperformance two fiducial pattern images 14 of the fiducial pattern 1A isrecorded. A first fiducial pattern image 23 is recorded to represent areference state. After the machine has been in use for a while a secondfiducial pattern image 24 is recorded. Alternatively the work piece 8 istaken out for machining elsewhere and put back in place before a secondfiducial pattern image 24 is recorded. The part position finder 6records, simultaneously with the respective recordings of the fiducialpattern images 23 and 24, the corresponding machine position data 17.The machine position data 17 are the positions of the machine positionencoders 103A and 103B. The purpose of the part position finder 6 is todeduce what the position, or position displacement, of important machineparts are. For this purpose the part position finder 6 takes partgeometry relations 15 and part displacement constraints 16 into account.

Accordingly, details regarding part geometry relations 15 and partdisplacement constrains 16 should be provided. The part geometryrelations 15 are entered into the part position finder 6 by the means ofa keyboard. The diagram in FIG. 3 shows the part geometry relations 15represented as the mechanical (fully drawn lines) and optical (dashedlines) interlinks between coordinate frames (rectangular boxes). Thisdiagram in FIG. 3 is one representation of the physical arrangement ofFIG. 2 where a moderate selected number of parts are taking intoaccount. A coordinate frame represents the position, includedorientation, of a part relative to another part. The part displacementconstraints 16 are also entered into the position finder 6 by the meansof the keyboard. The part displacement constraints 16 define what partdisplacement degrees of freedom that are allowed in finding new partpositions, included their maximum amount/magnitude. By taking the partdisplacement constraints 16 into account the part position finder 6finds the position displacement of parts with a minimum of positionrecording effort. In the present example we assume that the relativeposition between the work holder 12 and the work piece 8 is, for onereason or the other, changing. We assume in the present example that thex-y-position (in the horizontal plane) of first and second fiducialpattern images 23 and 24 of the fiducial pattern 1A is recorded. Thenaccording to our presumption a simple part displacement constraints 16is that the work piece 8 is the only part that is allowed to move, andthat the only displacements degrees of freedom that are allowed are thex- and y-translations of the work piece 8. With this information thepart position finder 6 can find the new work piece 8 position on thebasis of only one second recording of the fiducial pattern 1A.

Now, part position finder initial condition; combining 14, 15, 16, 17and ensuring loop consistency are elucidated. As a starting point forcalculating a part displacement 18, i.e. the new work piece 8 positionrelative to the work holder support 12, the part position finder 6ensures that all relevant initial conditions of the part geometryrelations are consistent with each others. This is accomplished byrecording the first fiducial pattern image 23 of the fiducial pattern1A, and corresponding machine position data 17, into the properreference frames of the part geometry relations 15. I.e. the positionencoder 103A data are added to the position of the work piece referenceframe 100 (FIG. 3), representing the work piece carrier 100 positionrelative to the work piece support 104. Likewise the position encoder103B data are added to the position of the frame 101 (FIG. 3),representing the work tool carrier 101 position relative to the worktool support 106. Finally the fiducial pattern image 23 of the fiducialpattern 1A is added to the optical detector 3 frame (see FIG. 3). Thisensures that the initial part geometry relations 15 are consistent witheach others, i.e. for example all coordinate frames reproduce correctlyany spatial position within the geometry, and especially that thecalculation of a position through any closed loop of a part geometryrelations 15 replicates itself. As the machine is changing its conditionthe second fiducial pattern image 24 of the fiducial pattern 1A, and thecorresponding new machine position data 17, are fed into the partgeometry relations 15 of the part position finder 6 in the same manneras described above.

Now, fiducial pattern image displacement is elucidated. The partposition finder 6 calculates the x-y-displacement between the firstfiducial pattern image 23 and the second fiducial pattern image 24 ofthe fiducial pattern 1A. In this example we assume that the displacementcalculation is carried out by the means of mathematical correlation.I.e. the part position finder 6 repeatedly stepwise translates in the x-and y-directions one image compared to the other, calculates thecorrelation, and finds the translation where the correlation is at itsmaximum. The correlation is calculated as the product of the gray levelnumbers for corresponding image pixel positions, then calculating thesum of the products over the image overlap.

In the following, how to find part displacement 18; loop calculation isdescribed. The fiducial pattern 1A is via the work piece 8 mechanicallyinterlinked to the optical detector 3 via the work holder 12, work piececarrier 100, work piece support 104, machine support link 105, work toolsupport 106, work tool carrier 101, bracket 107, and optical assembly 4.The fiducial pattern 1A is via the optical path 5A also opticallyinterlinked to the optical detector 3. This creates what we call aloop(3-8-12-100-104-105-106-101-107-4-3). The part position finder 6finds the work piece 8 x-y-translations by ensuring that all the framepositions in this loop are consistent with each other. By starting witha given position, and calculating the positions mapped through a certainclosed loop in the diagram of FIG. 3, we know that we should come backto the same position. I.e. one key purpose of the part position finder 6of this invention is to ensure that, when positions are mapped throughthe whole loop, all positions that are members of a given closed loopshould map back on to themselves. If the work piece 8 has translated inbetween the recording of the first fiducial pattern image 23 and thesecond fiducial pattern image 24 then the frame positions of theloop(3-8-12-100-104-105-106-101-107-4-3) are no longer consistent witheach other. The part position finder 6 then applies the partdisplacement constraint 16 that only the frame representing the workpiece 8 is allowed to translate in the horizontal plane (i.e. the x- andy-directions). Except for the carrier 103A and 103B displacements, takencare of by the machine position data 17, all other frames are assumed tohave not moved.

Accordingly, a mathematical solution to the loop calculation isdeveloped. The mathematical problem of restoring consistency is obtainedby solving a set of linear equations, describing the transforms betweenthe different frames. This can be accomplished by use of 4×4 matricesdescribing the 3 dimensional translation and rotation by means of socalled homogenous coordinates. In the present example the x-ytranslations between the fiducial pattern images 23 and 24 are knowvalues and the x-y-translation of the work piece 8, the partdisplacement 18, the unknown values. By this means the part positionfinder 6 calculates the work piece 8 translation and thereby also thework piece 8 new position.

Example 2

FIG. 2 is a schematic drawing illustrating, by way of example, a machinethat may represent any machine such as a milling machine, drillingmachine, Die sinking EDM (Electrical Discharge Machine), Wire EDM, orsimilar. This schematic drawing also illustrates generally, by way ofexample, one example of a machine that represents any quality controlmachine where the work tool 9 may be for example either a touch probe asin a CMM (Coordinate Measuring Machine), or an optical vision sensor, orsimilar. These machines can be equipped with a range of differentmechanical configurations, but all can be equipped with an apparatusaccording to the present invention. Some key elements of these machinesare indicated as a work piece carrier 100 (typically performing 2orthogonal translations x and y), a work tool carrier 101 (typicallyperforming one translation in the z direction, but sometimes also one orseveral additional rotations), a work tool chuck 102, position encoders103A, 103B, and a support structure. The support structure is in thisexample indicated to include a work piece support 104, a machine supportlink 105, and a work tool support 106. The purpose of this machine is toperform machining or quality control of the work piece 8 by means of thework tool 9. In this example the work tool 9 is fastened to the worktool chuck 102. The work tool 9 can be a machining tool, spark erosiontool, mechanical sensor, position stylus sensor, optical imaging sensor,microscope, or similar. An area of the work piece 8, to be machined orquality controlled, we shall call the work area 10. Moving the work tool9 relative to the work piece 8, by means of the work tool carrier 101and the work piece carrier 100, performs displacements necessary for themachining or quality control processes to take place. During process theposition of these carriers is read at the locations of the positionencoders 103A, 103B. In order to position the work piece 8, and therebythe work area 10, relative to the work tool 9, the work piece 8 isplaced in a work holder 11. Typically, the work holder 11 is firmlyfastened to the work piece carrier 100. A work holder 11 may typicallyconsist of a work holder support 12, a work holder clamp 13, and worklocators 2A, 2B, 2C. By placing the work piece 8 against the worklocators 2A, 2B, 2C, and by clamping it by use of the work holder clamp13, the work piece 8 is securely fastened to the work holder 11.

In this example, a problem to be dealt with can be stated as follows. Inrelation to what has been described above, however, one key problem isthat the position encoders 103A and 103B are mounted at a distance awayfrom the locations of the work area 10 and the work tool 9 tip, and forexample, due to unknown angular errors, may not be reading the correctpositions of the work tool 9 or the work piece area 10. As aconsequence, the clamping process and both thermal and mechanical forcesmay cause the location of the work piece 8, relative to the location ofthe work tool 9 position, to slightly change or vary during operationsof the machining or quality control. In the present example we shallassume that the work piece 8 might translate relative to the work holdersupport 12.

Accordingly, details regarding the first machine part 20; the secondmachine part 21; the fiducial pattern 1; the optical detector 3; thefiducial pattern image 14 and machine position 17 should be provided.The reduction of the position errors is accomplished by recordingoptical images of fiducial patterns, as exemplified in FIG. 2 where anoptical detector 3 records the fiducial pattern image 14 of the fiducialpattern 1B and relays it to the a part position finder 6. The opticaldetector is a 2 dimensional array camera. The optical detector 3 is bymeans of the optical assembly 4 and the bracket 107 fastened to the worktool carrier 101. The part position finder 6 can be embodied as processwithin a computer, personal computer, dedicated processor, or similar.The fiducial pattern images 14 are by known means converted/digitizedand will be available for computer position calculation. In FIG. 2 thefiducial pattern 1B is, as an example, a machined detail in the surfaceof the work piece 8 such as a drilled hole or milled detail. Through theoptical path 5B (not shown in FIG. 2) the fiducial pattern 1B isoptically imaged to the optical detector 3. The same fiducial pattern 1Bis also via the work piece 8 and the locators 2A, 2B, 2C mechanicallyinterlinked to other parts of the machine. In order to improve machineperformance two fiducial pattern images 14 of the fiducial pattern 1B isrecorded. A first fiducial pattern image 23 is recorded to represent areference state. After the machine has been in use for a while a secondfiducial pattern image 24 is recorded. Alternatively the work piece 8 istaken out for machining elsewhere and put back in place before a secondfiducial pattern image 24 is recorded. The part position finder 6records, simultaneously with the respective recordings of the fiducialpattern images 23 and 24, the corresponding machine position data 17.The machine position data 17 are the positions of the machine positionencoders 103A and 103B. The purpose of the part position finder 6 is todeduce what the position, or position displacement, of important machineparts are. For this purpose the part position finder 6 takes partgeometry relations 15 and part displacement constraints 16 into account.

Accordingly, details regarding part geometry relations 15 and partdisplacement constrains 16 should be provided. The part geometryrelations 15 are entered into the part position finder 6 by the means ofa keyboard. The diagram in FIG. 3 shows the part geometry relations 15represented as the mechanical (fully drawn lines) and optical (dashedlines) interlinks between coordinate frames (rectangular boxes). Thisdiagram in FIG. 3 is one representation of the physical arrangement ofFIG. 2 where a moderate selected number of parts are taking intoaccount. A coordinate frame represents the position, includedorientation, of a part relative to another part. The part displacementconstraints 16 are also entered into the position finder 6 by the meansof the keyboard. The part displacement constraints 16 define what partdisplacement degrees of freedom that are allowed in finding new partpositions, included their maximum amount/magnitude. By taking the partdisplacement constraints 16 into account the part position finder 6finds the position displacement of parts with a minimum of positionrecording effort. In the present example we assume that the relativeposition between the work holder 12 and the work piece 8 is, for onereason or the other, changing. We assume in the present example that thex-y-position (in the horizontal plane) of first and second fiducialpattern images 23 and 24 of the fiducial pattern 1B is recorded. Thenaccording to our presumption a simple part displacement constraint 16 isthat the work piece 8 is the only part that is allowed to move, and thatthe only displacements degrees of freedom that are allowed are the x-and y-translations of the work piece 8. With this information the partposition finder 6 can find the new work piece 8 position on the basis ofonly one second recording of the fiducial pattern 1B.

Now, part position finder initial condition; combining 14, 15, 16, 17and ensuring loop consistency are elucidated. As a starting point forcalculating a part displacement 18, i.e. the new work piece 8 positionrelative to the work holder support 12, the part position finder 6ensures that all relevant initial conditions of the part geometryrelations are consistent with each others. This is accomplished byrecording the first fiducial pattern image 23 of the fiducial pattern1B, and corresponding machine position data 17, into the properreference frames of the part geometry relations 15. I.e. the positionencoder 103A data are added to the position of the work piece referenceframe 100 (FIG. 3), representing the work piece carrier 100 positionrelative to the work piece support 104. Likewise the position encoder103B data are added to the position of the frame 101 (FIG. 3),representing the work tool carrier 101 position relative to the worktool support 106. Finally the fiducial pattern image 23 of the fiducialpattern 1B is added to the optical detector 3 frame (see FIG. 3). Thisensures that the initial part geometry relations 15 are consistent witheach others, i.e. for example all coordinate frames reproduce correctlyany spatial position within the geometry, and especially that thecalculation of a position through any closed loop of a part geometryrelations 15 replicates itself. As the machine is changing its conditiona second fiducial pattern image 24 of the fiducial pattern 1B, and thecorresponding new machine position data 17, are fed into the partgeometry relations 15 of the part position finder 6, in the same manneras described above.

Now, fiducial pattern image displacement is elucidated. The partposition finder 6 calculates the x-y-translations between the firstfiducial pattern image 23 and the second fiducial pattern image 24 ofthe fiducial pattern 1B. In this example we assume that the fiducialpattern 1B is a hole and that the translation calculation is carried outby calculating the hole center of the two images, and then calculatingthe center translation. To find the hole center known image processingtechniques of finding hole edge gray level thresholds and calculatingthe center of these threshold positions is used.

In the following, how to find part displacement 18; loop calculation isdescribed. The fiducial pattern 1B is via the work piece 8 mechanicallyinterlinked to the optical detector 3 via the work holder 12, work piececarrier 100, work piece support 104, machine support link 105, work toolsupport 106, work tool carrier 101, bracket 107, and optical assembly 4.The fiducial pattern 1B is via the optical path 5B also opticallyinterlinked to the optical detector 3. This creates what we call a theloop(3-8-12-100-104-105-106-101-107-4-3). The part position finder 6finds the work piece 8 displacements by ensuring that all the framepositions in this loop are consistent with each other. By starting witha given position, and calculating the positions mapped through a certainclosed loop in the diagram of FIG. 3, we know that we should come backto the same position. I.e. one key purpose of the part position finder 6of this invention is to ensure that, when positions are mapped throughthe whole loop, all positions that are members of a given closed loopshould map back on to themselves. If the work piece 8 has translated inbetween the recording of the first fiducial pattern image 23 and thesecond fiducial pattern image 24 then the frame positions of theloop(3-8-12-100-104-105-106-101-107-4-3) are no longer consistent witheach other. The part position finder 6 then applies the partdisplacement constraint 16 that only the frame representing the workpiece 8 is allowed to translate in the horizontal plane (i.e. the x- andy-directions). Except for the carrier 103A and 103B displacements, takencare of by the machine position data 17, all other frames are assumed tohave not moved.

Accordingly, a mathematical solution to the loop calculation isdeveloped. The mathematical problem of ensuring consistency is obtainedby solving a set of linear equations, describing the transforms betweenthe different frames. This can be accomplished by use of 4×4 matricesdescribing 3 the dimensional translation and rotation by means ofhomogenous coordinates. In the present example the x-y translationsbetween the fiducial pattern images 23 and 24 are know values and thex-y-translations of the work piece 8, the part displacement 18, theunknown values. By this means the part position finder 6 calculates thework piece 8 translation and thereby also the work piece 8 new position.

Example 3

FIG. 2 is a schematic drawing illustrating, by way of example, a machinethat may represent any machine such as a milling machine, drillingmachine, Die sinking EDM (Electrical Discharge Machine), Wire EDM, orsimilar. This schematic drawing also illustrates generally, by way ofexample, one example of a machine that represents any quality controlmachine where the work tool 9 may be for example either a touch probe asin a CMM (Coordinate Measuring Machine), or an optical vision sensor, orsimilar. These machines can be equipped with a range of differentmechanical configurations, but all can be equipped with an apparatusaccording to the present invention. Some key elements of these machinesare indicated as a work piece carrier 100 (typically performing 2orthogonal translations x and y), a work tool carrier 101 (typicallyperforming one translation in the z direction, but sometimes also one orseveral additional rotations), a work tool chuck 102, position encoders103A, 103B, and a support structure. The support structure is in thisexample indicated to include a work piece support 104, a machine supportlink 105, and a work tool support 106. The purpose of this machine is toperform machining or quality control of the work piece 8 by means of thework tool 9. In this example the work tool 9 is fastened to the worktool chuck 102. The work tool 9 can be a machining tool, spark erosiontool, mechanical sensor, position stylus sensor, optical imaging sensor,microscope, or similar. An area of the work piece 8, to be machined orquality controlled, we shall call the work area 10. Moving the work tool9 relative to the work piece 8, by means of the work tool carrier 101and the work piece carrier 100, performs displacements necessary for themachining or quality control processes to take place. During process theposition of these carriers is read at the locations of the positionencoders 103A, 103B. In order to position the work piece 8, and therebythe work area 10, relative to the work tool 9, the work piece 8 isplaced in a work holder 11. Typically, the work holder 11 is firmlyfastened to the work piece carrier 100. A work holder 11 may typicallyconsist of a work holder support 12, a work holder clamp 13, and worklocators 2A, 2B, 2C. By placing the work piece 8 against the worklocators 2A, 2B, 2C, and by clamping it by use of the work holder clamp13, the work piece 8 is securely fastened to the work holder 11.

In this example, a problem to be dealt with can be stated as follows.When the position of different machine parts changes by unknown amountsthe innovation according to the present disclosure may help. However, insome high accuracy applications even the position of the opticaldetector 3 may change due to for example thermal drift. Then a fiducialpattern 1F mounted close to the optical detector 3, but in a firm andstable position relative to the work tool carrier 101 may helpcompensate for this error. In the present example we shall assume thatthe position of the optical detector 3 translates in the horizontal x-and y-direction.

Accordingly, details regarding the first machine part 20; the secondmachine part 21; the fiducial pattern 1; the optical detector 3; thefiducial pattern image 14 and machine position 17 should be provided.The reduction of the position errors is accomplished by recordingoptical images of fiducial patterns, as exemplified in FIG. 2 where anoptical detector 3 records the fiducial pattern image 14 of the fiducialpattern 1F and relays it to the a part position finder 6. The opticaldetector is a 2 dimensional array camera. The optical detector 3 is bymeans of the optical assembly 4 and the bracket 107 fastened to the worktool carrier 101. The part position finder 6 can be embodied as processwithin a computer, personal computer, dedicated processor, or similar.The fiducial pattern images 14 are by known means converted/digitizedand will be available for computer position calculation. In FIG. 2 thefiducial pattern 1F is, as an example, a glass plate with apredetermined high contrast pattern evaporated on to its surface Weassume that the fiducial pattern 1F is trans-illuminated. Through theoptical path 5F the fiducial pattern 1F is optically imaged to theoptical detector 3. The same fiducial pattern 1F is also via the opticalassembly 4 and bracket 107 mechanically interlinked to the work toolcarrier 101. In order to compensate for the optical detector 3displacement only one fiducial pattern image 14 of the fiducial pattern1F needs to be recorded. Each time a first fiducial pattern image 23 hasbeen recorded the part position finder 6 compares the position of thisimage with a fiducial pattern image model 25 (not shown in FIG. 2). Thepurpose of the part position finder 6 is to deduce what the positiontranslation of the optical detector 3 is. For this purpose the partposition finder 6 takes part geometry relations 15 and part displacementconstraints 16 into account.

Accordingly, details regarding part geometry relations 15 and partdisplacement constrains 16 should be provided. The part geometryrelations 15 are entered into the part position finder 6 by the means ofa keyboard. The diagram in FIG. 3 shows the part geometry relations 15represented as the mechanical (fully drawn lines) and optical (dashedlines) interlinks between coordinate frames (rectangular boxes). Thisdiagram in FIG. 3 is one representation of the physical arrangement ofFIG. 2 where a moderate selected number of parts are taken into account.A coordinate frame represents the position, included orientation, of apart relative to another part. The part displacement constraints 16 arealso entered into the position finder 6 by the means of the keyboard.The part displacement constraints 16 define what part displacementdegrees of freedom that are allowed in finding new part positions,included their maximum amount/magnitude. By taking the part displacementconstraints 16 into account the part position finder 6 finds theposition displacement of parts with a minimum of position recordingeffort. In the present example we assume that the relative positionbetween the optical detector 3 and the optical assembly 4, for onereason or the other, changing. We assume in the present example that thex-y-position (in the horizontal plane) of the first fiducial patternimage 23 of the fiducial pattern 1F is recorded. Then according to ourpresumption a simple part displacement constraints 16 is that theoptical detector 3 is the only part that is allowed to move, and thatthe only displacements degrees of freedom that are allowed are the x-and y-translations of the optical detector 3. With this information thepart position finder 6 can find the optical detector 3 position on thebasis of the first fiducial pattern image 23 position relative to thefiducial pattern model 25.

Now, part position finder initial condition; combining 14, 15, 16, 17and ensuring loop consistency are elucidated. As a starting point forcalculating a part displacement 18, i.e. the new optical detector 3position relative to the optical assembly 4, the part position finder 6ensures that all relevant initial conditions of the part geometryrelations are consistent with each others. This is accomplished byplacing the fiducial pattern model 25 of the fiducial pattern 1F into areference position within the optical detector 3 frame (see FIG. 3).This ensures that the initial part geometry relations 15 are consistentwith each others with reference to this initial fiducial pattern model25 reference position, i.e. for example all coordinate frames reproducecorrectly any spatial position within the geometry, and especially thatthe calculation of a position through any closed loop of a part geometryrelations 15 replicates itself. As the machine is changing its conditionthe first fiducial pattern image 23 of the fiducial pattern 1F is fedinto the part geometry relations 15 of the part position finder 6, i.e.into the optical detector frame 3.

Now, fiducial pattern image displacement is elucidated. The partposition finder 6 calculates the x-y-translation between the fiducialpattern model 25 and the first fiducial pattern image 23 of the fiducialpattern 1F. In this example we assume that the fiducial pattern 1F is adeterministic pattern with many position details, like a matrix of holepatterns, and that the displacement calculation is carried out bycalculating the respective centroids of the fiducial pattern image model25 and the fiducial pattern image 23, and then calculating the centroiddisplacement. To find a pattern centroid known image processingtechniques of finding hole edge gray level threshold positions of eachmatrix hole, then calculating the center of these threshold positions,and finally finding the centroid of these hole centers.

In the following, how to find part displacement 18; loop calculation isdescribed. The fiducial pattern 1F is via the optical assembly 4mechanically interlinked to the optical detector 3. The fiducial pattern1F is via the optical path 5F also optically interlinked to the opticaldetector 3. This creates what we call the loop(3-4-3). The part positionfinder 6 finds the optical detector 3 displacements by ensuring that theframe positions in this loop are consistent with each other. By startingwith a given position, and calculating the positions mapped through acertain closed loop in the diagram of FIG. 3, we know that we shouldcome back to the same position. I.e. one key purpose of the partposition finder 6 of this invention is to ensure that, when positionsare mapped through the whole loop, all positions that are members of agiven closed loop should map back on to themselves. If the opticaldetector has moved the first fiducial pattern image 23 of theloop(3-4-3) is no longer consistent with fiducial pattern model 25position. The part position finder 6 then applies the part displacementconstraint 16 that only the frame representing the optical detector 3 isallowed to translate in the horizontal plane (i.e. the x- andy-directions).

Accordingly, a mathematical solution to the loop calculation isdeveloped. The mathematical problem of ensuring consistency is obtainedby solving a set of linear equations, describing the transforms betweenthe different frames. This can be accomplished by use of 4×4 matricesdescribing the 3 dimensional translation and rotation by means ofhomogenous coordinates. In the present example the x-y translationbetween the fiducial pattern image 23 and the fiducial pattern imagemodel 25 are know values and the x-y-translation of the optical detector3, the part displacement 18, the unknown values. By this means the partposition finder 6 calculates the optical detector 3 translation andthereby also the optical detector 3 new position. This optical detector3 displacement is an error that can be used to compensate for the e.g.the part displacements 8, as e.g. described in examples 1 and 2.

Example 4

FIG. 2 is a schematic drawing illustrating, by way of example, a machinethat may represent any machine such as a milling machine, drillingmachine, Die sinking EDM (Electrical Discharge Machine), Wire EDM, orsimilar. This schematic drawing also illustrates generally, by way ofexample, one example of a machine that represents any quality controlmachine where the work tool 9 may be for example either a touch probe asin a CMM (Coordinate Measuring Machine), or an optical vision sensor, orsimilar. These machines can be equipped with a range of differentmechanical configurations, but all can be equipped with an apparatusaccording to the present invention. Some key elements of these machinesare indicated as a work piece carrier 100 (typically performing 2orthogonal translations x and y), a work tool carrier 101 (typicallyperforming one translation in the z direction, but sometimes also one orseveral additional rotations), a work tool chuck 102, position encoders103A, 103B, and a support structure. The support structure is in thisexample indicated to include a work piece support 104, a machine supportlink 105, and a work tool support 106. The purpose of this machine is toperform machining or quality control of the work piece 8 by means of thework tool 9. In this example the work tool 9 is fastened to the worktool chuck 102. The work tool 9 can be a machining tool, spark erosiontool, mechanical sensor, position stylus sensor, optical imaging sensor,microscope, or similar. An area of the work piece 8, to be machined orquality controlled, we shall call the work area 10. Moving the work tool9 relative to the work piece 8, by means of the work tool carrier 101and the work piece carrier 100, performs displacements necessary for themachining or quality control processes to take place. During process theposition of these carriers is read at the locations of the positionencoders 103A, 103B. In order to position the work piece 8, and therebythe work area 10, relative to the work tool 9, the work piece 8 isplaced in a work holder 11. Typically, the work holder 11 is firmlyfastened to the work piece carrier 100. A work holder 11 may typicallyconsist of a work holder support 12, a work holder clamp 13, and worklocators 2A, 2B, 2C. By placing the work piece 8 against the worklocators 2A, 2B, 2C, and by clamping it by use of the work holder clamp13, the work piece 8 is securely fastened to the work holder 11.

In this example, a problem to be dealt with can be stated as follows. Inrelation to what has been described above, however, one key problem isthat the position encoders 103A and 103B are mounted at a distance awayfrom the locations of the work area 10 and the work tool 9 tip, and forexample, due to an unknown angular error, may not be reading the correctpositions of the work tool 9 or the work piece area 10. As a consequenceboth thermal and mechanical forces may cause the position of the machinesupport link 105 to slightly change or vary during operations of themachining or quality control. In the present example we shall assumethat the machine support link 105 might move relative to the work piecesupport 104.

Accordingly, details regarding the first machine part 20; the secondmachine part 21; the fiducial pattern 1; the optical detector 3; thefiducial pattern image 14 and machine position 17 should be provided.The reduction of the position errors is accomplished by recordingoptical images of fiducial patterns, as exemplified in FIG. 2 where anoptical detector 3 records the fiducial pattern images 14 of the threefiducial patterns 1E and relays them to the a part position finder 6.The optical detector is a 2 dimensional array camera. The opticaldetector 3 is by means of the optical assembly 4 and the bracket 107fastened to the work tool carrier 101. The part position finder 6 can beembodied as process within a computer, personal computer, dedicatedprocessor, or similar. The fiducial pattern images 14 are by known meansconverted/digitized and will be available for computer positioncalculation. In FIG. 2 by generality the three fiducial patterns 1E are,as an example, distributed as the given surface structure of threedifferent machine parts, the work piece carrier 100, the work holdersupport 12, and the work holder clamp 13, or alternatively threepatterned labels applied to the three different surfaces. Through theoptical paths 5E (not shown in FIG. 2, but similar to three shiftedversions of the indicated optical path 5A) the fiducial patterns 1E areoptically imaged to the optical detector 3. The same fiducial patterns1E are also via the work piece support 104 mechanically interlinked tothe other parts of the machine. In order to improve machine performancetwo fiducial pattern images 14 of each of the fiducial patterns 1E arerecorded. A first fiducial pattern image 23 of each of the fiducialpatterns 1E are recorded to represent three reference states. After themachine has been in use for a while a second fiducial pattern image 24of each of the fiducial patterns 1E are recorded. The part positionfinder 6 records, simultaneously with the respective recordings of thefiducial pattern images 23 and 24, the corresponding machine positiondata 17. The machine position data 17 are the positions of the machineposition encoders 103A and 103B. The purpose of the part position finder6 is to deduce what the position, or position displacement, of importantmachine parts are. For this purpose the part position finder 6 takespart geometry relations 15 and part displacement constraints 16 intoaccount.

Accordingly, details regarding part geometry relations 15 and partdisplacement constrains 16 should be provided. The part geometryrelations 15 are entered into the part position finder 6 by the means ofa keyboard. The diagram in FIG. 3 shows the part geometry relations 15represented as the mechanical (fully drawn lines) and optical (dashedlines) interlinks between coordinate frames (rectangular boxes). Thisdiagram in FIG. 3 is one representation of the physical arrangement ofFIG. 2 where a moderate selected number of parts are taking intoaccount. A coordinate frame represents the position, includedorientation, of a part relative to another part. The part displacementconstraints 16 are also entered into the position finder 6 by the meansof the keyboard. The part displacement constraints 16 define what partdisplacement degrees of freedom that are allowed in finding a new partposition, included their maximum amount/magnitude. By taking the partdisplacement constraints 16 into account the part position finder 6finds the position displacement of parts with a minimum of positionrecording effort. In the present example we assume that the relativeposition between the machine support link 105 and the work piece support104 is, for one reason or the other, changing. We assume in the presentexample that the x-y-position (in the horizontal plane) of first andsecond fiducial pattern images 23 and 24 of the fiducial patterns 1E arerecorded. Then according to our presumption a simple part displacementconstraints 16 is that the machine support link 105 is the only partthat is allowed to move, and that the only displacements degrees offreedom that are allowed are the y-translation and rotation around they-axis of this machine support link 105. With this information the partposition finder 6 will find the new machine support link 105 position onthe basis of only one second image 24 recording of the three fiducialpatterns 1E.

Now, part position finder initial condition; combining 14, 15, 16, 17and ensuring loop consistency are elucidated. As a starting point forcalculating a part displacement 18, i.e. the new machine support link105 position relative to the work piece support 104, the part positionfinder 6 ensures that all relevant initial conditions of the partgeometry relations are consistent with each others. This is accomplishedby recording the first fiducial pattern images 23 of the fiducialpatterns 1E. These first fiducial pattern images 23, and correspondingmachine position data 17, are recorded into the proper reference framesof the part geometry relations 15. I.e. the position encoder 103A dataare added to the position of the work piece reference frame 100 (FIG.3), representing the work piece carrier 100 position relative to thework piece support 104. Likewise the position encoder 103B data areadded to the position of the frame 101 (FIG. 3), representing the worktool carrier 101 position relative to the work tool support 106. Finallythe three different first fiducial pattern images 23 of the fiducialpattern 1E are added to the optical detector 3 frame (see FIG. 3). Thisensures that the initial part geometry relations 15 are consistent witheach others for three different carriers positions, i.e. for example forthese three positions all coordinate frames reproduce correctly anyspatial position within the geometry, and especially that thecalculation of a position through any closed loop of a part geometryrelations 15 replicates itself. As the machine is changing its conditionthe different second fiducial pattern images 24 of the fiducial patterns1E, and the corresponding new machine position data 17, are fed into thepart geometry relations 15 of the part position finder 6 in the samemanner as described above.

Now, fiducial pattern image displacement is elucidated. For the threedifferent fiducial patterns 1E the part position finder 6 calculates thex-y-translation between the first fiducial pattern image 23 and thecorresponding second fiducial pattern image 24. In this example weassume that the translation calculation is carried out by the means ofmathematical correlation. I.e. the part position finder 6 repeatedlystepwise translates in the x- and y-directions the corresponding firstimage 23 compared to the second image 24, calculates the correlation,and finds the translation where the correlation is at its maximum. Thecorrelation is calculated as the product of the gray level numbers forcorresponding image pixel positions, then calculating the sum of theproducts over the image overlap

In the following, how to find part displacement 18; loop calculation isdescribed. The fiducial patterns 1E are via the work piece carrier 100mechanically interlinked to the work piece support 104, machine supportlink 105, work tool support 106, work tool carrier 101, bracket 107, andoptical assembly 4. The fiducial patterns 1E are via the three differentoptical paths 5E (not shown in FIG. 2) also optically interlinked to theoptical detector 3. Since the position relations between the work holderclamp 13, work holder support 12, and the work piece carrier 100 in thepresent example are assumed to not change, we refer all three fiducialpatterns 1E to the work piece carrier 100 coordinate frame. This createsthree versions of what we call a loop(3-100-104-105-106-101-107-4-3).The part position finder 6 finds the machine support link 105displacements by ensuring that separately all the frame positions inthese three loops are consistent with each other. By starting with agiven position, and calculating the positions mapped through a certainclosed loop in the diagram of FIG. 3, we know that we should come backto the same position. I.e. one key purpose of the part position finder 6of this invention is to ensure that, when positions are mapped throughthe whole loop, all positions that are members of a given closed loopshould map back on to themselves. If the machine support link 105 hasmoved in between the recording of the first fiducial pattern image 23and the second fiducial pattern image 24 then the frame positions ineach of the three loops(3-100-104-105-106-101-107-4-3) are no longerconsistent with each other. The part position finder 6 then applies thepart displacement constraint 16 that only the frame representing themachine support link 105 is allowed to move in the horizontal plane(i.e. the y-directions) and rotate around the same y-axis. Except forthe carrier 103A and 103B displacements, taken care of by the machineposition data 17, all other frames are assumed to have not moved.

Accordingly, a mathematical solution to the loop calculation isdeveloped. In the present example the x-y displacement between the threepairs of fiducial pattern images 23 and 24 are know displacements andthe y-translation shift and y-rotation of the machine support link 105,the part displacement 18, the unknown displacements. By this means thepart position finder 6 calculates the machine support link 105displacement and thereby also the machine support link 105 new position.

The mathematical problem of ensuring consistency is accomplished byiteratively changing the unknown part displacements by small amounts,checking whether the second fiducial pattern image 24 positionsapproaches or moves away from the corresponding found translatedpositions, and then repeatedly changing the unknown displacements in thedirection of diminishing fiducial pattern image 24 position offsetsuntil the offsets are reduced down to a minimum, or below a smallthreshold limit. Advanced versions of this last approach are well knownfrom the iterative approach used by most lens design programs. There thecollection of ray position offset values in the image plane, a meritfunction, is iteratively reduced by repeatedly changing lens surfacecurvatures, distances, etc., until the collection of ray position offsetvalues are reduced down to a minimum, or below a small threshold limit.See e.g. the book Modern Lens Design by Warren J. Smith (Publisher:McGraw-Hill Professional Engineering, Two Penn Plaza; New York; ISBN0-07-143830-0). By analogy, in the present example we identify the imageoffset values with the ray position offset values, and create a meritfunction that is the squared sum of the fiducial pattern image 24 offsetvalues. By analogy we also identify the unknown machine support link 105y-translation and y-rotation with the lens surface curvatures,distances, etc. As a consequence we find the new machine support link105 position that best fit the observed second fiducial pattern image 24translations relative to the corresponding fiducial pattern 23positions.

As a consequence we improve the part geometry relations 15 with theupdated new position of the machine support link 105. Especially, byusing these new modified part geometry relations 15, represented by thecorresponding frame relations illustrated in FIG. 3, this new machinesupport link 105 position is automatically taken into account to improvethe determination of the work area position 10. It is also automaticallytaken into account to improve the position determination of all otherframes that are interlinked to the presentloop(3-100-104-105-106-101-107-4-3). As seen from FIG. 3 we note that inthe present example the position determination of the frame representingthe work tool 9 is improved, even though the work tool 9 is not a memberof the loop(3-100-104-105-106-101-107-4-3).

Example 5

FIG. 2 is a schematic drawing illustrating, by way of example, a machinethat may represent any machine such as a milling machine, drillingmachine, Die sinking EDM (Electrical Discharge Machine), Wire EDM, orsimilar. This schematic drawing also illustrates generally, by way ofexample, one example of a machine that represents any quality controlmachine where the work tool 9 may be for example either a touch probe asin a CMM (Coordinate Measuring Machine), or an optical vision sensor, orsimilar. These machines can be equipped with a range of differentmechanical configurations, but all can be equipped with an apparatusaccording to the present invention. Some key elements of these machinesare indicated as a work piece carrier 100 (typically performing 2orthogonal translations x and y), a work tool carrier 101 (typicallyperforming one translation in the z direction, but sometimes also one orseveral additional rotations), a work tool chuck 102, position encoders103A, 103B, and a support structure. The support structure is in thisexample indicated to include a work piece support 104, a machine supportlink 105, and a work tool support 106. The purpose of this machine is toperform machining or quality control of the work piece 8 by means of thework tool 9. In this example the work tool 9 is fastened to the worktool chuck 102. The work tool 9 can be a machining tool, spark erosiontool, mechanical sensor, position stylus sensor, optical imaging sensor,microscope, or similar. An area of the work piece 8, to be machined orquality controlled, we shall call the work area 10. Moving the work tool9 relative to the work piece 8, by means of the work tool carrier 101and the work piece carrier 100, performs displacements necessary for themachining or quality control processes to take place. During process theposition of these carriers is read at the locations of the positionencoders 103A, 103B. In order to position the work piece 8, and therebythe work area 10, relative to the work tool 9, the work piece 8 isplaced in a work holder 11. Typically, the work holder 11 is firmlyfastened to the work piece carrier 100. A work holder 11 may typicallyconsist of a work holder support 12, a work holder clamp 13, and worklocators 2A, 2B, 2C. By placing the work piece 8 against the worklocators 2A, 2B, 2C, and by clamping it by use of the work holder clamp13, the work piece 8 is securely fastened to the work holder 11.

In this example, a problem to be dealt with can be stated as follows. Inrelation to what has been described above, however, one key problem isthat the position encoders 103A and 103B are mounted at a distance awayfrom the locations of the work area 10 and the work tool 9 tip, and forexample, due to unknown angular errors, may not be reading the correctpositions of the work tool 9 or the work piece area 10. As aconsequence, the clamping process and both thermal and mechanical forcesmay cause the location of the work piece 8, relative to the location ofthe work tool 9 position, to slightly change or vary during operationsof the machining or quality control. In the present example we shallassume a combined displacement where the work piece 8 might translate,relative to the work holder support 12, orthogonal (x-y-directions) tothe detector 3 direction of observation, and that the machine supportlink 105 might rotate around the y-axis and translate parallel to they-direction to partially cause the detector 3 to move parallel(z-direction) and orthogonal (y-direction) to the detector 3 directionof observation.

Accordingly, details regarding the first machine part 20; the secondmachine part 21; the fiducial pattern 1; the optical detector 3; thefiducial pattern image 14 and machine position 17 should be provided.The reduction of the position errors is accomplished by recordingoptical images of fiducial patterns, as exemplified in FIG. 2 where anoptical detector 3 records the fiducial pattern image 14 of the fiducialpattern 1A and relays it to the a part position finder 6. The opticaldetector is a 2 dimensional array camera. The optical detector 3 is bymeans of the optical assembly 4 and the bracket 107 fastened to the worktool carrier 101. The part position finder 6 can be embodied as processwithin a computer, personal computer, dedicated processor, or similar.The fiducial pattern images 14 are by known means converted/digitizedand will be available for computer position calculation. In FIG. 2 thefiducial pattern 1A is, as an example, the given surface structure ofthe work piece 8, or alternatively a patterned label applied to thesurface. Through the optical path 5A the fiducial pattern 1A isoptically imaged to the optical detector 3. The same fiducial pattern 1Ais also via the work piece 8 and the locators 2A, 2B, 2C mechanicallyinterlinked to other parts of the machine. In order to improve machineperformance both two fiducial pattern images 14 of the fiducial pattern1A in a first optical configuration of the optical assembly 4 isrecorded and another two fiducial pattern images 14 of the fiducialpattern 1A in a second optical configuration of the optical assembly 4is recorded. The first optical assembly 4 configuration is arranged tobe sensitive to displacements orthogonal to the optical detector 3direction of observation. The second optical assembly 4 configuration isarranged to be sensitive to displacements parallel to the opticaldetector 3 direction of observation. In the beginning a first fiducialpattern image 23 in the first optical assembly 4 configuration, and afirst fiducial pattern image 23 in the second optical assembly 4configuration, is recorded to represent two reference states. After themachine has been in use for a while a second fiducial pattern image 24is recorded in both optical configurations. The part position finder 6records, simultaneously with the respective recordings of the fiducialpattern images 23 and 24, the corresponding machine position data 17.The machine position data 17 are the positions of the machine positionencoders 103A and 103B. The purpose of the part position finder 6 is todeduce what the position, or position displacement, of important machineparts are. For this purpose the part position finder 6 takes partgeometry relations 15 and part displacement constraints 16 into account.

Accordingly, details regarding part geometry relations 15 and partdisplacement constrains 16 should be provided. The part geometryrelations 15 are entered into the part position finder 6 from anothercomputer or processor, like for example a CNC (Computer NumericalControl) unit of the machine. The diagram in FIG. 3 shows the partgeometry relations 15 represented as the mechanical (fully drawn lines)and optical (dashed lines) interlinks between coordinate frames(rectangular boxes). This diagram in FIG. 3 is one representation of thephysical arrangement of FIG. 2 where a moderate selected number of partsare taking into account. A coordinate frame represents the position,included orientation, of a part relative to another part. The partdisplacement constraints 16 are also entered into the position finder 6from another computer or processor, like for example the CNC (ComputerNumerical Control) unit of the machine. The part displacementconstraints 16 define what part displacement degrees of freedom that areallowed in finding new part positions, included their maximumamount/magnitude. By taking the part displacement constraints 16 intoaccount the part position finder 6 finds the position displacement ofparts with a minimum of position recording effort. In the presentexample we assume that the relative position between both the workholder 12 and the work piece 8 and between the machine support link 105and the work piece support 104 is, for one reason or the other,changing. We assume in the present example that the first and secondfiducial pattern images 23 and 24 of the fiducial pattern 1A arerecorded both in the first and second optical assembly 4 configuration.Then according to our presumption the part displacement constraints 16are that both the work piece 8 and the machine support link 105 are theparts that are allowed to move, and that the only displacements degreesof freedom that are allowed are the orthogonal to the optical detector 3direction of observation x- and y-translations of the work piece 8 andthe y-rotation and y-translation of the machine support link 105. Tomake the example even more realistic we also assume that earlier wehave, by simulation or measurement, found that there is a couplingproportionality between the y-rotation and y-translation of the machinesupport link 105. This proportionality coupling we also include in thepart displacement constraints 16. With this information the partposition finder 6 can find both the new work piece 8 and machine supportlink 105 position.

Now, part position finder initial condition; combining 14, 15, 16, 17and ensuring loop consistency are elucidated. As a starting point forcalculating a part displacement 18, i.e. the new work piece 8 positionrelative to the work holder support 12, and the new machine support link105 position relative to the work piece support 104, the part positionfinder 6 ensures that all relevant initial conditions of the partgeometry relations are consistent with each others. This is accomplishedfor the two different optical assembly 4 configurations by recording twodifferent first fiducial pattern images 23 of the fiducial pattern 1A,where the first of the first fiducial pattern images 23 is created bythe first optical assembly 4 configuration of evenly illuminating thefiducial pattern 1A and the other optical assembly 4 configuration ofthe first fiducial pattern images 23 is created by illumination thefiducial pattern 1A with structured light at an angle to the directionof observation. The last configuration creates optical detector 3position sensitivity parallel to the direction of observation. Thesefirst fiducial pattern images 23, and corresponding machine positiondata 17, are fed into the proper reference frames of the part geometryrelations 15. I.e. the position encoder 103A data are added to theposition of the work piece reference frame 100 (FIG. 3), representingthe work piece carrier 100 position relative to the work piece support104. Likewise the position encoder 103B data are added to the positionof the frame 101 (FIG. 3), representing the work tool carrier 101position relative to the work tool support 106. Finally the twodifferent first fiducial pattern images 23 of the fiducial pattern 1Aare added to the optical detector 3 frame (see FIG. 3). This ensuresthat the initial part geometry relations 15 are consistent with eachothers for two different optical configurations, i.e. for example allcoordinate frames reproduce correctly any spatial position within thegeometry, and especially that the calculation of a position through anyclosed loop of a part geometry relations 15 replicates itself. As themachine is changing its condition the different second fiducial patternimages 24 of the fiducial pattern 1A, corresponding to the two differentoptical assembly 4 configurations, and the corresponding new machineposition data 17, are fed into the part geometry relations 15 of thepart position finder 6, in the same manner as described above.

Now, fiducial pattern image displacement is elucidated. For the twodifferent optical configurations the part position finder 6 calculatesthe x-y-translation between the corresponding first fiducial patternimage 23 and the second fiducial pattern image 24 of the fiducialpattern 1A. In this example we assume that the displacement calculationis carried out by the means of mathematical correlation. I.e. the partposition finder 6 repeatedly stepwise translates in the x- andy-directions the corresponding first image 23 compared to the secondimage 24, calculates the correlation, and finds the translation wherethe correlation is at its maximum. The correlation is calculated as theproduct of the gray level numbers for corresponding image pixelpositions, then calculating the sum of the products over the imageoverlap. For the images recorded with the second optical assembly 4configuration the x-y-translation of the structured light illuminationdistribution, as it is reflected from the fiducial pattern 1A, isobserved as an image translation between the first fiducial patternimage 23 and the second fiducial pattern image 24. By known opticaltechniques of optical triangulation this x-y-translation is bycalculation converted from an in-the-image-plane (x-y-) translation toan along-the-direction-of-observation (z-) translation.

In the following, how to find part displacement 18; loop calculation isdescribed. The fiducial pattern 1A of the work piece 8 is via the workholder support 12 mechanically interlinked to the work piece carrier100, the work piece support 104, machine support link 105, work toolsupport 106, work tool carrier 101, bracket 107, and optical assembly 4.The fiducial pattern 1A is via the optical path 5A also opticallyinterlinked to the optical detector 3. This creates what we call aloop(3-8-12-100-104-105-106-101-107-4-3). The part position finder 6finds the work piece 8 and the machine support link 105 displacements byensuring that all the frame positions in this loop are consistent witheach other. By starting with a given position, and calculating thepositions mapped through a certain closed loop in the diagram of FIG. 3,we know that we should come back to the same position. I.e. one keypurpose of the part position finder 6 of this invention is to ensurethat, when positions are mapped through the whole loop, all positionsthat are members of a given closed loop should map back on tothemselves. If the machine support link 105 has moved in between therecording of the first fiducial pattern image 23 and the second fiducialpattern image 24 then the frame positions of theloop(3-8-12-100-104-105-106-101-107-4-3) are no longer consistent witheach other. The part position finder 6 then applies the partdisplacement constraint 16 that only the frame representing the workpiece 8 is allowed to translate in the horizontal plane x- andy-directions and the frame representing the machine support link 105 isallowed to translate in the horizontal plane (i.e. the y-directions) androtate around the same y-axis. Except for the carrier 103A and 103Bdisplacements, taken care of by the machine position data 17, all otherframes are assumed to have not moved.

Accordingly, a mathematical solution to the loop calculation isdeveloped. In the present example the x-y displacement between fiducialpattern images 23 and 24, recorded in the first optical assembly 4configuration, and the z-displacement, recorded in the second opticalassembly 4 configuration, are know displacements. The x- andy-translation of the work piece 8, and the coupled y-translation andy-rotation of the machine support link 105, are the unknown partdisplacements 8.

The mathematical problem of ensuring consistency is accomplished byiteratively changing the unknown part displacements by small amounts,checking whether the second fiducial pattern image 24 positionsapproaches or moves away from the corresponding found displacedpositions, and then repeatedly changing the unknown displacements in thedirection of diminishing fiducial pattern image 24 position offsetsuntil the offsets are reduced down to a minimum, or below a smallthreshold limit. Advanced versions of this last approach are well knownfrom the iterative approach used by most lens design programs. There thecollection of ray position offset values in the image plane, a meritfunction, is iteratively reduced by repeatedly changing lens surfacecurvatures, distances, etc., until the collection of ray position offsetvalues are reduced down to a minimum, or below a small threshold limit.See e.g. the book Modern Lens Design by Warren J. Smith (Publisher:McGraw-Hill Professional Engineering, Two Penn Plaza; New York; ISBN0-07-143830-0). By analogy in the present example we identify the imagex-y and z-offset values with the ray position offset values, and createa merit function that is the squared sum of these fiducial pattern image24 offset values. By analogy we also identify the unknown work piece 8x-y-translation and the machine support link 105 y-translation andy-rotation with the lens surface curvatures, distances, etc. As aconsequence we find the new work piece 8 and the new machine supportlink 105 positions that best fit the observed second fiducial patternimage 24 displacements relative to the corresponding fiducial pattern 23positions.

Example 6

FIG. 4 is a schematic drawing illustrating, by way of example, a machinethat may represent any machine such as a milling machine, drillingmachine, Die sinking EDM (Electrical Discharge Machine), Wire EDM, orsimilar. These machines can be equipped with a range of differentmechanical configurations, but all can be equipped with an apparatusaccording to the present invention. Some key elements of these machinesare indicated as a work piece carrier 100 (typically performing 2orthogonal translations x and y), a work tool carrier 101 (typicallyperforming one translation in the z direction, but sometimes also one orseveral additional rotations), a work tool chuck 102, position encoders103A, 103B, and a support structure. The support structure is in thisexample indicated to include a work piece support 104, a machine supportlink 105, and a work tool support 106. The purpose of this machine is toperform machining or quality control of the work piece 8 by means of thework tool 9. In this example the work tool 9 is fastened to the worktool chuck 102. The work tool 9 is a machining tool. An area of the workpiece 8 to be machined we shall call the work area 10. Moving the worktool 9 relative to the work piece 8, by means of the work tool carrier101 and the work piece carrier 100, performs displacements necessary forthe machining to take place. During process the position of thesecarriers is read at the locations of the position encoders 103A, 103B.In order to position the work piece 8, and thereby the work area 10,relative to the work tool 9, the work piece 8 is placed in a work holder11. Typically, the work holder 11 is firmly fastened to the work piececarrier 100. A work holder 11 may typically consist of a work holdersupport 12, a work holder clamp 13, and work locators 2A, 2B, 2C. Byplacing the work piece 8 against the work locators 2A, 2B, 2C, and byclamping it by use of the work holder clamp 13, the work piece 8 issecurely fastened to the work holder 11.

In this example, a problem to be dealt with can be stated as follows.This example illustrates how to refer the work tool 9 tip location topositions of the optical detector 3 by means of a gauge tool 19, therebydetermining the exact location of the work tool 9 tip. Here, the gaugetool 19 may reside permanently inside the machine, but outside the workarea, or be temporarily placed in the machine for the purpose of tool 9position control. One key problem is that the work tool 9 tips areproduced with tolerance differences and that the tips wear down duringmachining. This results in machining errors. In the present example weassume that the gauge tool 19 is placed mounted so that it is allowed toslightly translate in the +/−x and +/−y directions by for examplespring-loading it in those directions. By use of the machinestranslation degrees of freedom (for example x, y, and z) the work tool9, such as a milling or drilling tool, can be translated to make thetool tip touch a vertical plane inside the gauge tool 19. If the gaugetool 19 is made to slightly move towards the springs there will beestablished a given distance between the tip touch point and thefiducial pattern 1A. When the gauge tool 19 is not spring loaded it willrest against a well defined position stop.

Accordingly, details regarding the first machine part 20; the secondmachine part 21; the fiducial pattern 1; the optical detector 3; thefiducial pattern image 14 and machine position 17 should be provided.The reduction of the work tool 9 tip location errors is accomplished byrecording optical images of fiducial patterns, as exemplified in FIG. 4where an optical detector 3 records the fiducial pattern image 14 of thefiducial pattern 1A and relays it to the a part position finder 6. Theoptical detector is a 1 dimensional array camera. The optical detector 3is by means of the optical assembly 4 and the bracket 107 fastened tothe work tool carrier 101. The part position finder 6 is electronicallyhard wired to perform the part position 6 operations. The fiducialpattern images 14 are by known means converted/digitized and will beavailable for part position finder 6 operations. In FIG. 2 the fiducialpattern 1A is, as an example, the given surface structure of the gaugetool 19, or alternatively an extended patterned label applied to itssurface. Through the optical path 5A the fiducial pattern 1A isoptically imaged to the optical detector 3. The same fiducial pattern 1Ais also via the gauge tool 19 mechanically interlinked to other parts ofthe machine. In order to improve machine performance two fiducialpattern images 14 of the fiducial pattern 1A is recorded. To represent areference state a first fiducial pattern image 23 is recorded when thework tool 9 tip is close to a gauge tool 19 surface, but not touchingit. After the work piece carrier 100 is translated, to make the worktool tip slightly translate the gauge tool 19, a second fiducial patternimage 24 is recorded. The part position finder 6 records, simultaneouslywith the respective recordings of the fiducial pattern images 23 and 24,the corresponding machine position data 17. The machine position data 17are the positions of the machine position encoders 103A and 103B. Thepurpose of the part position finder 6 is to deduce what the position, orposition displacement, of the work tool 9 tip is. For this purpose thepart position finder 6 takes part geometry relations 15 and partdisplacement constraints 16 into account.

Accordingly, details regarding part geometry relations 15 and partdisplacement constrains 16 should be provided. The part geometryrelations 15 have been earlier hard wired into the part position finder6 electronic device. The diagram in FIG. 5 shows the part geometryrelations 15 represented as the mechanical (fully drawn lines) andoptical (dashed lines) interlinks between coordinate frames (rectangularboxes). This diagram in FIG. 5 is one representation of the physicalarrangement of FIG. 4 where a moderate selected number of parts aretaking into account. A coordinate frame represents the position,included orientation, of a part relative to another part. The partdisplacement constraints 16 have been earlier hard wired into the partposition finder 6 electronic device. The part displacement constraints16 define what part displacement degrees of freedom that are allowed infinding new part positions, included their maximum amount/magnitude. Bytaking the part displacement constraints 16 into account the partposition finder 6 finds the position displacement of parts with aminimum of position recording effort. In the present example we assumethat the relative position between the gauge tool 19 and the work tool 9tip is deliberately changed. We assume in the present example that thex-position (in the horizontal plane and paper plane direction) of firstand second fiducial pattern images 23 and 24 of the fiducial pattern 1Ais recorded. Then according to our presumption a simple partdisplacement constraint 16 is that the gauge tool 19 is the only partthat is allowed to move, and that the only displacements degree offreedom that is allowed is the x-translation of the gauge tool 19. Withthis information the part position finder 6 can find the new gauge tool19 position on the basis of only one second recording of the fiducialpattern 1A. By use of calibrated distances, to be described below, thework tool 9 tip position can be extracted.

Now, part position finder initial condition; combining 14, 15, 16, 17and ensuring loop consistency are elucidated. As a starting point forcalculating a part displacement 18, i.e. the new gauge tool 19 positionrelative to the work piece carrier 100, the part position finder 6ensures that all relevant initial conditions of the part geometryrelations are consistent with each others. This is accomplished byrecording the first fiducial pattern image 23 of the fiducial pattern1A, and corresponding machine position data 17, into the properreference frames of the part geometry relations 15 of a memory locationof the part position finder 6. In addition the exact distance from thefiducial pattern 1A to the gauge tool 19 surface, where the work tooltip is touching the gauge tool 19, is independently calibrated andrecorded to the corresponding frame. That calibration distance isrecorded by means of a calibration machine. In practice a range of firstfiducial pattern images 23, and corresponding calibrated distances tocorresponding fiducial patterns 1A, are earlier recorded into a memorylocation of the hard wire version of the part position finder 6. Inaddition the position encoder 103A data are added to the position of thework piece reference frame 100 (FIG. 3), representing the work piececarrier 100 position relative to the work piece support 104. Likewisethe position encoder 103B data are added to the position of the frame101 (FIG. 3), representing the work tool carrier 101 position relativeto the work tool support 106. Finally the fiducial pattern image 23 ofthe fiducial pattern 1A is added to the optical detector 3 frame (seeFIG. 3). This ensures that the initial part geometry relations 15 areconsistent with each others, i.e. for example all coordinate framesreproduce correctly any spatial position within the geometry, andespecially that the calculation of a position through any closed loop ofa part geometry relations 15 replicates itself. As the machine ischanging its condition the second fiducial pattern image 24 of thefiducial pattern 1A, and the corresponding new machine position data 17,are fed into the part geometry relations 15 of the part position finder6 in the same manner as described above.

Now, fiducial pattern image displacement is elucidated. The partposition finder 6 calculates the x-displacement between the firstfiducial pattern image 23 and the second fiducial pattern image 24 ofthe fiducial pattern 1A. In this example we assume that the displacementcalculation is hard wired to carry out a mathematical correlation. I.e.the part position finder 6 is hard wired to repeatedly stepwisetranslate in the x-directions one image compared to the other, calculatethe correlation, and find the translation where the correlation is atits maximum. The correlation is calculated as the product of the graylevel numbers for corresponding image pixel positions, then calculatingthe sum of the products over the image overlap.

In the following, how to find part displacement 18; loop calculation isdescribed. When the first fiducial pattern image 23 was recorded thefiducial pattern 1A was via the gauge tool 19 mechanically interlinkedto the optical detector 3 via the work piece carrier 100 (defined by thespring stop position), work piece support 104, machine support link 105,work tool support 106, work tool carrier 101, bracket 107, and opticalassembly 4. The fiducial pattern 1A is via the optical path 5A alsooptically interlinked to the optical detector 3. This creates what wecall a the loop(3-19-100-104-105-106-101-107-4-3). When the secondfiducial pattern image 24 is recorded the part position finder 6 findsthe gauge tool 19 displacements by ensuring that all the frame positionsin the new loop(3-19-9-102-101-107-4-3) are consistent with each other.I.e. the translation of the gauge tool 19 by means of the work tool 9creates a new loop. By starting with a given position, and calculatingthe positions mapped through a certain closed loop in the diagram ofFIG. 3, we know that we should come back to the same position. I.e. onekey purpose of the part position finder 6 of this invention is to ensurethat, when positions are mapped through the whole loop, all positionsthat are members of a given closed loop should map back on tothemselves. After the gauge tool 19 has moved in between the recordingof the first fiducial pattern image 23 and the second fiducial patternimage 24 then the frame positions of the loop(3-19-9-102-101-107-4-3)are no longer consistent with each other. The part position finder 6then applies the part displacement constraint 16 that only the framerepresenting the work piece 8 is allowed to move in the horizontal plane(i.e. in the x-directions). Except for the carrier 103A and 103Bdisplacements, taken care of by the machine position data 17, all otherframes are assumed to have not moved.

Accordingly, a mathematical solution to the loop calculation isdeveloped. The mathematical problem of ensuring consistency is obtainedby solving a set of linear equations, describing the transforms betweenthe different frames. This can be accomplished by use of 4×4 matricesdescribing the 3 dimensional translation and rotation by means ofhomogenous coordinates. In the present example the x-translation betweenthe fiducial pattern images 23 and 24 are know values and the x-offsetof the work tool 9 tip position, the part displacement 18, the unknownvalue. By this means the part position finder 6 calculates the work tool9 tip offset and thereby also the work tool 9 tip new position.

The invention claimed is:
 1. A method for finding position relations ofparts of a machine, said method comprising creating a first image and asecond image of a fiducial pattern of a second machine part or creatinga first image and a second image of a plurality of additional patternsof a second machine part, using an optical detector, fastened to a firstmachine part, receiving in a part position finder said pattern imagesfrom said optical detector, receiving part geometry relations, in saidpart position finder, said part geometry relations describing positionalrelations between the first machine part, the second machine part, thefiducial patterns, and a third machine part, and positional relationsbetween the first, second and third machine parts and the opticaldetector, receiving in the part position finder a part displacementconstraint, said part displacement constraint describing an alloweddegree of freedom of displacement for at least one of said first, secondand third machine parts and the optical detector, using said partposition to determine a fiducial pattern image displacement between afirst fiducial pattern image and a second fiducial pattern image orbetween a first fiducial pattern and a fiducial pattern image model,using said part position finder to modify, according to said partdisplacement constraint, at least one of said part geometry relations todetermine a new machine part displacement that produces fiducial patternimage displacements corresponding to said determined fiducial patternimage displacements; and using a fiducial pattern cleaning device forcleaning said fiducial pattern by means of air blow, or blow ofdetergent agency followed by air blow.
 2. The method of claim 1, whereinsaid part displacement is the displacement of one of said first, secondor third machine parts, or of the optical detector.
 3. The method ofclaim 1, further comprising adapting said optical detector to befastened to a work tool carrier.
 4. The method of claim 1, furthercomprising adapting said optical detector to be fastened to a work piececarrier.
 5. The method of claim 1, further comprising providing for saidoptical detector imaging optics adapted to optically resolve a machinedor casted fine structure of a surface of said second part.
 6. The methodof claim 1, wherein an optical path between said fiducial pattern andsaid optical detector is confined within an optical assembly.
 7. Themethod of claim 1, wherein an optical path between said fiducial patternand said optical detector is confined within an optical assembly andanother optical path between said fiducial pattern and said opticaldetector is partially external to and partially internal to an opticalassembly.
 8. The method of claim 1, wherein an optical assemblycontaining said optical detector is telecentric on the fiducial pattern.9. The method of claim 1, further comprising illuminated said fiducialpattern with structured light, at an angle to a direction ofobservation, to create triangulation sensitivity in the direction ofobservation.
 10. The method of claim 1, further comprising providing aplurality of optical detectors and using said optical plurality ofoptical detectors to create different triangulation pairs of said firstimage and second image of said fiducial pattern.
 11. The method of claim1, further comprising moving said optical detector from one location toanother location and creating different triangulation pairs of saidfirst image and said second image of said fiducial pattern.
 12. Themethod of claim 1, wherein said part position finder comprises acomputer, an electronic processor, an embedded processor, or hard wiredelectronics.
 13. The method of claim 1, wherein said part positionfinder comprises a first input for receiving said fiducial patternimages from said optical detector, a second input for receiving saidpart geometry relations, and a third input for receiving said partdisplacement constraint, said first, second and third inputs beingdistributed on different computers, electronic processors, embeddedprocessors, or hard wired electronics, and wherein said computers,electronic processors, embedded processors or hard wire electronics arebeing adapted to exchange data when finding said part displacement. 14.The method of claim 1, further comprising finding said displacement ofsaid fiducial pattern image relative to said fiducial pattern image bycalculating a displacement for which a degree of correlation is at amaximum.
 15. The method of claim 1, further comprising finding saiddisplacement of said fiducial pattern image relative to said fiducialpattern image by calculating a position of a geometrical centroid inboth images and deducing said image displacement from said centroiddisplacement.
 16. The method of claim 1, further comprising using saidpart position finder to recognize a machine part by recording saidsecond image of said fiducial pattern of assumingly the same part, andby calculating a maximum degree of correlation with said first image ofthat part, and regarding a degree of correlation above a certainthreshold to be a recognition.
 17. The method of claim 1, furthercomprising using said part position finder to recognize a machine partamong a group of several other parts by a) recording the second image ofthe fiducial pattern of that part, b) calculating a respective maximumdegree of correlation between this second image and each of the firstimages of the other parts, and then c) regarding the part that gives themaximum degree of correlation to be the one that is recognized.
 18. Themethod of claim 1, wherein the fiducial pattern is a processed surfaceof at least one of a machine support structure, a work piece, a worktool, a gauge tool, a work holder, an optical detector, or an opticalassembly.
 19. A method for finding position relations of parts of amachine, said method comprising creating a first image and a secondimage of a fiducial pattern of a second machine part or creating a firstimage and a second image of a plurality of additional patterns of asecond machine part, using an optical detector, fastened to a firstmachine part, receiving in a part position finder said pattern imagesfrom said optical detector, receiving part geometry relations, in saidpart position finder, said part geometry relations describing positionalrelations between the first machine part, the second machine part, thefiducial patterns, and a third machine part, and positional relationsbetween the first, second and third machine parts and the opticaldetector, receiving in the part position finder a part displacementconstraint, said part displacement constraint describing an alloweddegree of freedom of displacement for at least one of said first, secondand third machine parts and the optical detector, using said partposition to determine a fiducial pattern image displacement between afirst fiducial pattern image and a second fiducial pattern image orbetween a first fiducial pattern and a fiducial pattern image model,using said part position finder to modify, according to said partdisplacement constraint, at least one of said part geometry relations todetermine a new machine part displacement that produces fiducial patternimage displacements corresponding to said determined fiducial patternimage displacements; and providing the fiducial pattern with a tag orlabel device adapted to carry a high contrast pattern, fastened to amachine support structure, work piece, work tool, gauge tool, workholder, optical detector, or optical assembly.
 20. The method of claim1, wherein said fiducial pattern is represented by a range of fiducialpatterns being distributed regularly or irregularly over a surface. 21.The method of claim 1, wherein the fiducial pattern is represented by afiducial pattern created by means of the said machine work tool.
 22. Themethod of claim 1, further comprising making a center of the fiducialpattern to represent a spindle center of the work tool.
 23. The methodof claim 1, further comprising receiving machine position data in thepart position finder by a fourth input.
 24. The method of claim 1,further comprising receiving in the part position finder machineposition data from a machine computer numerical control unit.
 25. Themethod of claim 1, wherein the part position finder is adapted tocontrol the machine position by an input of the machine position data tothe machine computer numerical control unit.
 26. The method of claim 1,wherein the part position finder having an input for receiving themachine position data from a keyboard or keypad unit.
 27. The method ofclaim 1, further comprising fastening the optical detector to either thetool holder, work piece holder, or a support structure of said machine.28. The method of claim 1, further comprising inputting the partgeometry relations by means of a keyboard or a keypad.
 29. The method ofclaim 1, further comprising preprogramming the part geometry relationsinto a computer, electronic processor, embedded processor, or hard wiredelectronics.
 30. The method of claim 1, further comprising inputting thepart geometry relations from an external computer or processor,especially said machine's computer or processor.
 31. The method of claim1, wherein the part geometry relations are hard wired into a partposition finder electronics.
 32. The method of claim 1, furthercomprising inputting a part displacement constraints by means of akeyboard or a keypad.
 33. The method of claim 1, further comprisingpreprogramming the part displacement constraints into a computer,electronic processor, embedded processor, or hard wire electronics. 34.The method of claim 1, further comprising inputting the partdisplacement constraint from an external computer or processor,especially said machine's computer or processor.
 35. The method of claim1, further comprising hard wiring the part displacement constraints intoa part position finder electronics.
 36. The method of claim 1, furthercomprising including with said part geometry relations pre-calibratedmachine part and positions of said fiducial pattern.
 37. The method ofclaim 1, further comprising receiving in said part position finder firstfiducial pattern images that are recorded by a second optical detector.38. The method of claim 1, further comprising using said part positionfinder to combine displacements between said first fiducial patternimage and second fiducial pattern image from several fiducial patternsinto a total displacement offset merit function to iteratively determinethe part displacement combinations that reduce this merit function to aminimum.
 39. A computer program product comprising a computer readablemedium having thereon computer readable and computer executable codearranged to adapt a computer means to perform the method accordingclaim
 1. 40. A method for finding position relations of parts of amachine, said method comprising creating a first image and a secondimage of a fiducial pattern of a second machine part or creating a firstimage and a second image of a plurality of additional patterns of asecond machine part, using an optical detector, fastened to a firstmachine part, receiving in a part position finder said pattern imagesfrom said optical detector, receiving part geometry relations, in saidpart position finder, said part geometry relations describing positionalrelations between the first machine part, the second machine part, thefiducial patterns, and a third machine part, and positional relationsbetween the first, second and third machine parts and the opticaldetector, receiving in the part position finder a part displacementconstraint, said part displacement constraint describing an alloweddegree of freedom of displacement for at least one of said first, secondand third machine parts and the optical detector, using said partposition to determine a fiducial pattern image displacement between afirst fiducial pattern image and a second fiducial pattern image orbetween a first fiducial pattern and a fiducial pattern image model,using said part position finder to modify, according to said partdisplacement constraint, at least one of said part geometry relations todetermine a new machine part displacement that produces fiducial patternimage displacements corresponding to said determined fiducial patternimage displacements, and using a fiducial pattern cleaning device forcleaning said fiducial pattern by means of air blow, or blow ofdetergent agency followed by air blow.
 41. A method for finding positionrelations of parts of a machine, said method comprising creating a firstimage and a second image of a fiducial pattern of a second machine partor creating a first image and a second image of a plurality ofadditional patterns of a second machine part, using an optical detector,fastened to a first machine part, receiving in a part position findersaid pattern images from said optical detector, receiving part geometryrelations, in said part position finder, said part geometry relationsdescribing positional relations between the first machine part, thesecond machine part, the fiducial patterns, and a third machine part,and positional relations between the first, second and third machineparts and the optical detector, receiving in the part position finder apart displacement constraint, said part displacement constraintdescribing an allowed degree of freedom of displacement for at least oneof said first, second and third machine parts and the optical detector,using said part position to determine a fiducial pattern imagedisplacement between a first fiducial pattern image and a secondfiducial pattern image or between a first fiducial pattern and afiducial pattern image model, using said part position finder to modify,according to said part displacement constraint, at least one of saidpart geometry relations to determine a new machine part displacementthat produces fiducial pattern image displacements corresponding to saiddetermined fiducial pattern image displacements, and providing thefiducial pattern with a tag or label device adapted to carry a highcontrast pattern, fastened to a machine support structure, work piece,work tool, gauge tool, work holder, optical detector, or opticalassembly.
 42. A method for finding position relations of parts of amachine, said method comprising creating a first image and a secondimage of a fiducial pattern of a second machine part or creating a firstimage and a second image of a plurality of additional patterns of asecond machine part, using an optical detector, fastened to a firstmachine part, receiving in a part position finder said pattern imagesfrom said optical detector, receiving part geometry relations, in saidpart position finder, said part geometry relations describing positionalrelations between the first machine part, the second machine part, thefiducial patterns, and a third machine part, and positional relationsbetween the first, second and third machine parts and the opticaldetector, receiving in the part position finder a part displacementconstraint, said part displacement constraint describing an alloweddegree of freedom of displacement for at least one of said first, secondand third machine parts and the optical detector, using said partposition to determine a fiducial pattern image displacement between afirst fiducial pattern image and a second fiducial pattern image orbetween a first fiducial pattern and a fiducial pattern image model,using said part position finder to modify, according to said partdisplacement constraint, at least one of said part geometry relations todetermine a new machine part displacement that produces fiducial patternimage displacements corresponding to said determined fiducial patternimage displacements, and using said part position finder to combinedisplacements between said first fiducial pattern image and secondfiducial pattern image from several fiducial patterns into a totaldisplacement offset merit function to iteratively determine the partdisplacement combinations that reduce this merit function to a minimum.43. A computer program product comprising a computer readable mediumhaving thereon computer readable and computer executable code arrangedto adapt a computer means to perform the method according claim
 19. 44.A computer program product comprising a computer readable medium havingthereon computer readable and computer executable code arranged to adapta computer means to perform the method according claim
 40. 45. Acomputer program product comprising a computer readable medium havingthereon computer readable and computer executable code arranged to adapta computer means to perform the method according claim
 41. 46. Acomputer program product comprising a computer readable medium havingthereon computer readable and computer executable code arranged to adapta computer means to perform the method according claim 42.